from rest_framework.viewsets import ModelViewSet
from django.contrib.auth.models import Group

from meiduo_admin.serializers.userGroupSerializer import UserGroupSerializer
from meiduo_admin.utils import PaginatorShow
from meiduo_admin.permissions import *


class UserGroupView(ModelViewSet):
    queryset = Group.objects.all().order_by("id")
    serializer_class = UserGroupSerializer
    permission_classes = [IsSuperUser]

    pagination_class = PaginatorShow